<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Game
 *
 * @property int $id
 * @property string|null $name
 * @property string|null $rule 规则
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\GamePrize[] $gamePrize
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\GamePrizeRecord[] $record
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Game whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Game whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Game whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Game whereRule($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Game whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class Game extends Model
{
    protected $table='games';
    public function gamePrize(){
        return $this->hasMany('App\GamePrize','game_id');
    }
    public function record(){
        return $this->hasMany('App\GamePrizeRecord','game_id');
    }
}
